<?php
require 'kernel/common.php';

if(!$Session->check_admin()) 
    redirect('index.php');
    
if(!$Session->csrf_check_get()) 
    redirect('logout.php?csrf');
    
if(!$to_uninstall = retrieve('GET','plugins_to_uninstall',true)) 
    redirect('index.php');
    
$uninstall_module = true;

if(is_file('plugins/'. $to_uninstall .'/inc/uninstall_'.$basesql['type'].'.php'))
    require 'plugins/'. $to_uninstall .'/inc/uninstall_'.$basesql['type'].'.php';
    
redirect('plugins_gestion.php',10);

require_once 'footer.php';
?>